package hang.xipujewelWeb.entity.app;

import hang.xipujewelWeb.entity.IdEntity;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

@Entity
@Table(name = "xipu_jewel")
public class Jewel extends IdEntity {

	private String num;//编号
	private String shape; //形状
	private float weight; //重量
	private String color; //颜色
	private String neatness; //净度
	private String cut; //切工
	private String buffing; //抛光
	private String symmetry; //对称
	private String fluorescence;//荧光
	private String card; //证书
	private String size; //尺寸
	private String cardId; //证书号
	private int internationalPrice;//国际报价
	private String company;//公司
	private float discount;//折扣
	private int priceRMB; //人民币/价格
	private String holdType; //库存  1国内库存   2海外库存
	private String hasMilkColor;//有无奶油色
	private String hasCoffeeColor;//有无咖啡色
	private String hasGreenColor;//有无绿色
	private int isBuy;//是否已被购买 1已被下单，0被未下单
	private int holdTypeSort;//1国内库存   2海外库存 用于排序

	private List<Order> orders = new ArrayList<Order>();//关联订单列表

	private float secondPrice;//二级批发价
	private Long shopCartId;
	private float secondDiscount;

	public Jewel() {
		super();
	}

	@Transient
	public float getSecondDiscount() {
		return secondDiscount;
	}

	public void setSecondDiscount(float secondDiscount) {
		this.secondDiscount = secondDiscount;
	}

	@Transient
	public Long getShopCartId() {
		return shopCartId;
	}

	public void setShopCartId(Long shopCartId) {
		this.shopCartId = shopCartId;
	}

	public int getHoldTypeSort() {
		return holdTypeSort;
	}

	public void setHoldTypeSort(int holdTypeSort) {
		this.holdTypeSort = holdTypeSort;
	}

	public String getCard() {
		return card;
	}

	public void setCard(String card) {
		this.card = card;
	}

	public String getShape() {
		return shape;
	}

	public void setShape(String shape) {
		this.shape = shape;
	}

	public float getWeight() {
		return weight;
	}

	public void setWeight(float weight) {
		this.weight = weight;
	}

	public String getColor() {
		return color;
	}

	public void setColor(String color) {
		this.color = color;
	}

	public String getNeatness() {
		return neatness;
	}

	public void setNeatness(String neatness) {
		this.neatness = neatness;
	}

	public String getCut() {
		return cut;
	}

	public void setCut(String cut) {
		this.cut = cut;
	}

	public String getBuffing() {
		return buffing;
	}

	public void setBuffing(String buffing) {
		this.buffing = buffing;
	}

	public String getSymmetry() {
		return symmetry;
	}

	public void setSymmetry(String symmetry) {
		this.symmetry = symmetry;
	}

	public String getFluorescence() {
		return fluorescence;
	}

	public void setFluorescence(String fluorescence) {
		this.fluorescence = fluorescence;
	}

	public String getSize() {
		return size;
	}

	public void setSize(String size) {
		this.size = size;
	}

	@ManyToMany(fetch = FetchType.LAZY, mappedBy = "jewels")
	public List<Order> getOrders() {
		return orders;
	}

	public void setOrders(List<Order> orders) {
		this.orders = orders;
	}

	public int getIsBuy() {
		return isBuy;
	}

	public void setIsBuy(int isBuy) {
		this.isBuy = isBuy;
	}

	public String getNum() {
		return num;
	}

	public void setNum(String num) {
		this.num = num;
	}

	public String getCardId() {
		return cardId;
	}

	public void setCardId(String cardId) {
		this.cardId = cardId;
	}

	public int getInternationalPrice() {
		return internationalPrice;
	}

	public void setInternationalPrice(int internationalPrice) {
		this.internationalPrice = internationalPrice;
	}

	public String getCompany() {
		return company;
	}

	public void setCompany(String company) {
		this.company = company;
	}

	public float getDiscount() {
		return discount;
	}

	public void setDiscount(float discount) {
		this.discount = discount;
	}

	public int getPriceRMB() {
		return priceRMB;
	}

	public void setPriceRMB(int priceRMB) {
		this.priceRMB = priceRMB;
	}

	public String getHoldType() {
		return holdType;
	}

	public void setHoldType(String holdType) {
		this.holdType = holdType;
	}

	public String getHasMilkColor() {
		return hasMilkColor;
	}

	public void setHasMilkColor(String hasMilkColor) {
		this.hasMilkColor = hasMilkColor;
	}

	public String getHasCoffeeColor() {
		return hasCoffeeColor;
	}

	public void setHasCoffeeColor(String hasCoffeeColor) {
		this.hasCoffeeColor = hasCoffeeColor;
	}

	public String getHasGreenColor() {
		return hasGreenColor;
	}

	public void setHasGreenColor(String hasGreenColor) {
		this.hasGreenColor = hasGreenColor;
	}

	@Transient
	public float getSecondPrice() {
		return secondPrice;
	}

	public void setSecondPrice(float secondPrice) {
		this.secondPrice = secondPrice;
	}

}
